package myaop.service;

import myaop.dao.UserDao;
import myaop.pojo.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("userService")
public class UserServiceImpl implements UserService {
    @Resource
    UserDao userDao;
    @Override
    public int save(User user) {
        return userDao.save(user);
    }

    @Override
    public int update(User user) {
        return userDao.update(user);
    }

    @Override
    public int saveById(int id, String name) {
        return userDao.saveById(id,name);
    }

    @Override
    public List<String> findById(int id) {
        return userDao.findById(id);
    }

    @Override
    public List<String> findByName(String name) {
        return userDao.findByName(name);
    }
}
